Open
Conversation
yihui
reviewed
Jan 18, 2026
Owner
yihui
left a comment
There was a problem hiding this comment.
Thanks! Using a partial sounds like an overkill for this task. I think a site-level config is more appropriate, and the natural solution is the default function:
{{ .Date.Format (default "2006/01/02" .Site.Params.dateFormat) }}
This patch introduces a new site-level configuration variable to control the date format. I have added a short usage note inside `about.md`, which would be useful to users of this theme who are not familiar with the way that time formatting works in Golang.
3bf6c2c to
8486015
Compare
Author
|
@yihui Thanks for that! The |
Author
|
@yihui Thank you for the approval! Is there anything else for me to do, or are you waiting on something else before merging this PR?
…--
Siddharth Kannan
***@***.***
On Sun, Feb 8, 2026, at 9:55 PM, Yihui Xie wrote:
***@***.**** approved this pull request.
Looks good!
—
Reply to this email directly, view it on GitHub <#85 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA37QQQL2O37W7KN6EGE6WL4K5PQBAVCNFSM6AAAAACSB55BFSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTONRZHE2DCMJSGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Owner
|
@icyflame Like most other feature PRs, this one will not be merged. This theme is meant to be a bare minimal one, and those who are interested in learning how to add new features can learn from the pull requests. Apologies for not being clear in the first place, and thanks again for your contribution! |
Author
|
Ah, I see! Got it ✅
…--
Siddharth Kannan
***@***.***
On Thu, Feb 12, 2026, at 10:27 AM, Yihui Xie wrote:
*yihui* left a comment (yihui/hugo-xmin#85) <#85 (comment)>
@icyflame <https://github.com/icyflame> Like most other feature PRs <https://github.com/yihui/hugo-xmin/pulls>, this one will not be merged. This theme is meant to be a bare minimal one, and those who are interested in learning how to add new features can learn from the pull requests <https://yihui.org/en/2017/09/pull-requests-as-a-teaching-tool/>. Apologies for not being clear in the first place, and thanks again for your contribution!
—
Reply to this email directly, view it on GitHub <#85 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA37QQTWQJ2ETSW2ULRYP3D4LQB3NAVCNFSM6AAAAACSB55BFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQOBYGY4DQNRUHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for this great, minimalist Hugo theme. I really like the look and its simplicity. I am completely new to Hugo, but I was able to easily edit the existing templates by looking at the documentation and the example site.
One feature that I wanted was to be able to customize the date format, and display dates as
2006-01-02. This PR adds that feature. This works, but ...I am not entirely certain that using a partial is the right solution here, as a site-level configuration variable feels more appropriate. However, I was not able to figure out how to define a "default" format without using an
if-elseblock, so I chose to implement this using partials.The if-else block would reduce the readability of the existing
single.htmltemplate, as it may look something like this: